<template>
  <div class="swiper">
    <swiper :options="swiperOption">
      <swiper-slide v-for="(item,index) of list" :key="index" @click="ImgUrl(item.h5_url)">
        <img class="swiper-img" :src="item.img_url" alt="">
      </swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
  export default {
    name:'homeswiper',
    data() {
      return {
        swiperOption: {
          pagination: {
            el: '.swiper-pagination',
          },
          loop:true,
          autoplay:{
            autoplay:true,
            delay:3000,
          }
        }
      }
    },
    props:{
      list:Array
    },
    methods:{
      ImgUrl(e){
        window.location.href = e
      }
    }
  }
</script>
<style lang="stylus" scoped>
.swiper>>>.swiper-pagination-bullet-active{background:#fff;}
.swiper{width:100%;/*height:0;overflow:hidden;padding-bottom:46.66667%;*/background:#eee;touch-action: none;}
.swiper .swiper-slide{height:auto;}
.swiper-img{width:100%;height:100%;}
</style>